package com.rhs.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.sql.DataSource;

@Controller
public class QuickController {
    @Autowired
    private DataSource dataSource;
    @Value("${test.name}")
    private String name;

    @RequestMapping("/quick")
    //如果方法返回的是字符串 直接输出到浏览器
    @ResponseBody
    public String quick() {
        System.out.println(dataSource);
        System.out.println(name);
        return "hello,springboot!!!6666666680964";
    }

}
